<!DOCTYPE html>
<html lang="en">
	<head>
			<meta charset="UTF-8">
			<meta name="viewport" content="width=device-width, initial-scale=1">
			<link href="css/style.css" rel="stylesheet">
		<title>html5新增的布局元素</title>
		{% load static%}
        <link rel="stylesheet" type="text/css" href="{% static 'css/7css.css' %}"/>
        <script>
                function guangzu(empno){
                // 设置更新博客查询的url请求地址
                    url = "/login/emp/xxqk2/" + empno;
                    window.location = url;
                }
                // 自定义函数，实现删除博客的请求发送
          
                
        </script>
	</head>

	<body bgcolor="mediumblue"  background="{% static 'image/t01d61356d326bd0f99.jpg' %}">
        <!----头部-->
        {% include "html2.html" %}
        <div id="contatiner" style="height: 800px;border: 1px solid gray; margin-top: 5px" >
                <section>
                    {% for item in lstemp %}  
                    <article>
                        
                        <h3  style="display:inline;">{{item.title}}</h3><br>
                        {% ifequal item.genre '1' %}
                        文章类型：<h4  style="display:inline;">技术类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
                        {% else %}
                        {% ifequal item.genre '2' %}
                        文章类型：<h4  style="display:inline;">生活类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
                        {% else %}
                        {% ifequal item.genre '3'  %}
                        文章类型：<h4  style="display:inline;">其它类</h4>&nbsp;&nbsp;&nbsp;&nbsp;
                        {% endifequal %}
                        {% endifequal %}
                        {% endifequal %}
                        发布者：<h4 style="display:inline;">{{item.dept.name}}</h4>
                        
                        {% autoescape off %}
                        <h4>{{item.artile | truncatechars:25}}<button type="button" id="btnUpdate" class="btnsubmit" onclick="javascript:guangzu({{ item.empno }});">详情</button></h4>
                        {% endautoescape %}
                            
                        <br>
                       
                    </article>
			        {% endfor %}
                </section>
                <!--侧边栏-->
                
                </div>
            <p>
                {% if lstemp.has_previous %}
                <a href="?page={{ lstemp.previous_page_number }}">上一页</a>
                {% endif %}
        
                当前：{{ lstemp.number }} / {{ lstemp.paginator.num_pages }}
        
                {% if lstemp.has_next %}        
                <a href="?page={{ lstemp.next_page_number }}">下一页</a>
                {% endif %}
            </p>
            {% include "yewb.html" %}
            </body>        

</html>